<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <ui:composition template="/template/DefaultTemplate.xhtml">
        <ui:define name="title">
            <h:outputText value="Edit Price List"></h:outputText>
        </ui:define>
        <ui:define name="content">
            <h:form>
                <p:panel header="Edit Price List">
                    <p:messages />
                    <br />
                    <h:panelGrid columns="2">
                        <h:outputLabel value="Type" for="type" />
                        <h:inputText id="type" value="#{priceListEntityController.selected.type}" title="#{bundle.EditPriceListEntityTitle_type}" />
                        <h:outputLabel value="Product:" for="product" />
                        <h:selectOneMenu id="product" value="#{priceListEntityController.selected.product}" >
                            <f:selectItems value="#{productEntityController.itemsAvailableSelectOne}"/>
                        </h:selectOneMenu>
                        <h:outputText value="Tiered Quantity:"/>
                        <h:inputText value="#{priceListEntityController.selected.tieredQuantity}"/>
                        <h:outputText value="Price:"/>
                        <h:inputText value="#{priceListEntityController.selected.price}"/>

                    </h:panelGrid>
                    <p:commandButton ajax="false" action="#{priceListEntityController.update}" value="Save"/>
                    &nbsp;
                    <p:commandButton ajax="false" action="View" value="View" immediate="true"/>
                    &nbsp;
                    <p:commandButton ajax="false" action="#{priceListEntityController.prepareList}" value="Show All" immediate="true"/>
                    <br />
                    <br />
                </p:panel> 
            </h:form>
        </ui:define>
    </ui:composition>

</html>
